package cn.akwangl.design.pattern.behavioral.chainresponsibility.v1;

/**
 * 责任链模式#v1
 *
 * @author youyongkun
 * @date 2021/12/7 10:25
 */
public class ChainOfResponsibilityPattern {

    public static void main(String[] args) {
        //组装责任链
        Handler handler1 = new ConcreteHandler1();
        Handler handler2 = new ConcreteHandler2();
        handler1.setNext(handler2);

        //提交请求
        handler1.handleRequest("two");
    }
}
